package com.wchat.dataobject;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wchat.serviceimpl.serializer.Date2LongSerialezer;
import lombok.Data;
import lombok.ToString;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by yangtianrui on 17/8/11.
 */
@Entity
@Data
@ToString
@DynamicUpdate
public class OrderDetail {
    @Id
    private String detailId;
    /**订单ID*/
    private String orderId;
    /**商品id*/
    private String productId;
    /**商品名称*/
    private String productName;
    /**商品价格*/
    private BigDecimal productPrice;
    /**商品数量*/
    private Integer productQuantity;
    /**商品小图*/
    private String productIcon;
    @JsonSerialize(using = Date2LongSerialezer.class)
    private Date createTime;
    @JsonSerialize(using = Date2LongSerialezer.class)
    private Date updateTime;
}
